package com.ruoyi.find.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 团购信息对象 group_purchase
 * 
 * @author yang
 * @date 2025-09-16
 */
public class GroupPurchase extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 团购ID，主键 */
    @Excel(name = "团购ID，主键")
    private Long groupPurchaseId;

    /** 楼盘ID，外键关联楼盘表 */
    @Excel(name = "楼盘ID，外键关联楼盘表")
    private Long propertyId;

    /** 团购标题 */
    @Excel(name = "团购标题")
    private String title;

    /** 团购开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "团购开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startDate;

    /** 团购结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "团购结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endDate;

    /** 折扣率（如9.5表示95折） */
    @Excel(name = "折扣率", readConverterExp = "如=9.5表示95折")
    private BigDecimal discountRate;

    /** 最低成团人数 */
    @Excel(name = "最低成团人数")
    private Long minPeople;

    /** 当前参与人数 */
    @Excel(name = "当前参与人数")
    private Long currentPeople;

    /** 状态（pending-待开始，active-进行中，ended-已结束） */
    @Excel(name = "状态", readConverterExp = "p=ending-待开始，active-进行中，ended-已结束")
    private String status;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedAt;

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    @TableField(exist = false)
    private String customerName;
    public void setGroupPurchaseId(Long groupPurchaseId) 
    {
        this.groupPurchaseId = groupPurchaseId;
    }

    public Long getGroupPurchaseId() 
    {
        return groupPurchaseId;
    }

    public void setPropertyId(Long propertyId) 
    {
        this.propertyId = propertyId;
    }

    public Long getPropertyId() 
    {
        return propertyId;
    }

    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }

    public void setStartDate(Date startDate) 
    {
        this.startDate = startDate;
    }

    public Date getStartDate() 
    {
        return startDate;
    }

    public void setEndDate(Date endDate) 
    {
        this.endDate = endDate;
    }

    public Date getEndDate() 
    {
        return endDate;
    }

    public void setDiscountRate(BigDecimal discountRate) 
    {
        this.discountRate = discountRate;
    }

    public BigDecimal getDiscountRate() 
    {
        return discountRate;
    }

    public void setMinPeople(Long minPeople) 
    {
        this.minPeople = minPeople;
    }

    public Long getMinPeople() 
    {
        return minPeople;
    }

    public void setCurrentPeople(Long currentPeople) 
    {
        this.currentPeople = currentPeople;
    }

    public Long getCurrentPeople() 
    {
        return currentPeople;
    }

    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }

    public void setUpdatedAt(Date updatedAt) 
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt() 
    {
        return updatedAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("groupPurchaseId", getGroupPurchaseId())
            .append("propertyId", getPropertyId())
            .append("title", getTitle())
            .append("startDate", getStartDate())
            .append("endDate", getEndDate())
            .append("discountRate", getDiscountRate())
            .append("minPeople", getMinPeople())
            .append("currentPeople", getCurrentPeople())
            .append("status", getStatus())
            .append("createdAt", getCreatedAt())
            .append("updatedAt", getUpdatedAt())
            .toString();
    }
}
